﻿<%@ Control Language="C#" AutoEventWireup="false" CodeBehind="BlogViewControl.ascx.cs"
    Inherits="ud_Article.UI.BlogViewControl" %>
<%@ Register TagPrefix="blog" TagName="TagList" Src="~/Article/Controls/CategoryListControl.ascx" %>
<%@ Register TagPrefix="blog" TagName="Archives" Src="~/Article/Controls/ArchiveListControl.ascx" %>
<%@ Register TagPrefix="blog" TagName="FeedLinks" Src="~/Article/Controls/FeedLinksControl.ascx" %>
<%@ Register TagPrefix="blog" TagName="StatsControl" Src="~/Article/Controls/StatsControl.ascx" %>
<asp:Panel ID="pnlBlog" runat="server" CssClass="panelwrapper articleview">
    <portal:ModuleTitleControlCustom ID="Title1" runat="server" RenderArtisteer="true"
        UseLowerCaseArtisteerClasses="true" />
    <portal:mojoPanel ID="MojoPanel1" runat="server" ArtisteerCssClass="art-PostContent"
        RenderArtisteer="true" UseLowerCaseArtisteerClasses="true">
        <div class="modulecontent">
            <asp:Panel ID="divNav" runat="server" CssClass="blognavright" EnableViewState="false">
                <blog:FeedLinks ID="Feeds" runat="server" />
                <asp:Panel ID="pnlStatistics" runat="server" EnableViewState="false">
                    <blog:StatsControl ID="stats" runat="server" />
                </asp:Panel>
                <asp:Panel ID="pnlCategories" runat="server" SkinID="plain" EnableViewState="false">
                    <blog:TagList ID="tags" runat="server" />
                </asp:Panel>
                <asp:Panel ID="pnlArchives" runat="server" SkinID="plain">
                    <blog:Archives ID="archive" runat="server" />
                </asp:Panel>
            </asp:Panel>
            <asp:Panel ID="divblog" runat="server" CssClass="blogcenter-rightnav" SkinID="plain"
                DefaultButton="btnPostComment">
                <div class="body">
                    <h2 class="blogtitle">
                        <asp:Literal ID="litTitle" runat="server" EnableViewState="false" />&nbsp;
                        <asp:HyperLink ID="lnkEdit" runat="server" EnableViewState="false" CssClass="ModuleEditLink"></asp:HyperLink>
                    </h2>
                    <div class="blogdate">
                        <asp:Literal ID="litAuthor" runat="server" EnableViewState="false" Visible="false" />
                        <asp:Literal ID="litStartDate" runat="server" EnableViewState="false" />
                    </div>
                    <asp:Panel ID="pnlImageWrapper" runat="server" class="image-wrapper">
                        <asp:Image ID="image1" runat="server" />
                    </asp:Panel>
                    <div class="blogpager">
                        <asp:HyperLink ID="lnkPreviousPostTop" runat="server" Visible="false" EnableViewState="false"></asp:HyperLink>
                        <asp:HyperLink ID="lnkNextPostTop" runat="server" Visible="false" EnableViewState="false"></asp:HyperLink>
                    </div>
                    <asp:Panel ID="pnlDetails" runat="server">
                        <portal:mojoRating runat="server" ID="Rating" Enabled="false" />
                        <mp:OdiogoItem ID="odiogoPlayer" runat="server" EnableViewState="false" />
                        <div class="blogtext">
                            <asp:Literal ID="litDescription" runat="server" EnableViewState="false" />
                        </div>
                        <asp:Panel ID="pnlAttachment" runat="server" CssClass="blogattachment">
                            <mp:SiteLabel ID="lblAttachments" runat="server" ForControl="txtCategory" CssClass="label"
                                    ConfigKey="AttachmentsLabel" ResourceFile="ArticleResources"></mp:SiteLabel>
                            <asp:Repeater ID="rptAttachments" runat="server" EnableViewState="false">
                                <ItemTemplate>
                                    <asp:Image ID="imgType" runat="server" AlternateText=" " ImageUrl='<%# Page.ResolveUrl("~/Data/SiteImages/Icons/unknown.png") %>' />
                                    <%# BuildDownloadLink(Eval("p.ID").ToString(),Eval("q.FileName").ToString())%>
                                </ItemTemplate>
                            </asp:Repeater>
                        </asp:Panel>
                        <div class="bloghit">
                            <asp:Literal ID="ltrBack" runat="server"></asp:Literal>
                            <portal:FacebookLikeButton ID="fblike" runat="server" />
                            <portal:FacebookShareButton ID="fbshare" runat="server" />
                            <portal:TweetThisLink ID="tweetThis1" runat="server" />
                            <portal:GoogleBookmarkButton id="googleBookmark" runat="server" />
                            <asp:Panel ID="pnlFeedbackTrigger" runat="server" CssClass="feedbacktrigger"></asp:Panel>
                            <asp:Literal ID="ltrCommentCountLabel" runat="server" />
                            <mp:SiteLabel ID="lblHitCount" runat="server" ResourceFile="ArticleResources" ConfigKey="HitCount"
                                CssClass="hit" />
                            <asp:Label ID="lblHitCountLabel" runat="server" CssClass="texthit" />                            
                            <a href="#" class="gotop">
                                <asp:Image id="imageGoTop" runat="server" />
                            <asp:Literal ID="ltrGoTop" runat="server"></asp:Literal>
                            </a>
                        </div>
                        <goog:LocationMap ID="gmap" runat="server" EnableViewState="false" Visible="false">
                        </goog:LocationMap>
                        <div class="blogcopyright">
                            <asp:Label ID="lblCopyright" runat="server" />
                        </div>
                        
                        
                        <div class="blogpagerbottom">
                            <asp:HyperLink ID="lnkPreviousPost" runat="server" Visible="false" EnableViewState="false"></asp:HyperLink>
                            <asp:HyperLink ID="lnkNextPost" runat="server" Visible="false" EnableViewState="false"></asp:HyperLink>
                        </div>
                        <div class="blogcommentservice">
                            <portal:IntenseDebateDiscussion ID="intenseDebate" runat="server" />
                            <portal:DisqusWidget ID="disqus" runat="server" RenderPoweredBy="false" />
                        </div>
                        <asp:Panel ID="pnlFeedback" runat="server" CssClass="feedback">
                            <fieldset>
                                <legend>
                                    <mp:SiteLabel ID="lblFeedback" runat="server" ConfigKey="BlogFeedbackLabel" ResourceFile="ArticleResources"
                                        EnableViewState="false"></mp:SiteLabel>
                                </legend>
                                <div class="blogcomments">
                                    <asp:Repeater ID="dlComments" runat="server" EnableViewState="true" OnItemCommand="dlComments_ItemCommand">
                                        <ItemTemplate>
                                            <h3 class="blogtitle">
                                                <asp:ImageButton ID="btnDelete" runat="server" AlternateText="<%# Resources.ArticleResources.DeleteImageAltText %>"
                                                    ToolTip="<%# Resources.ArticleResources.DeleteImageAltText %>" ImageUrl='<%# DeleteLinkImage %>'
                                                    CommandName="DeleteComment" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"BlogCommentID")%>'
                                                    Visible="<%# IsEditable%>" />
                                                <asp:Literal ID="litTitle" runat="server" EnableViewState="false" Text='<%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem,"Title").ToString()) %>' />
                                            </h3>
                                            <div>
                                                <asp:Label ID="Label2" Visible="True" runat="server" EnableViewState="false" CssClass="blogdate"
                                                    Text='<%# FormatCommentDate(Convert.ToDateTime(Eval("DateCreated"))) %>' />
                                                <asp:Label ID="Label3" runat="server" EnableViewState="false" Visible='<%# DataBinder.Eval(Container.DataItem, "URL").ToString().Length == 0 %>'
                                                    CssClass="blogcommentposter">
					                                <%#  Server.HtmlEncode(DataBinder.Eval(Container.DataItem,"Name").ToString()) %>
                                                </asp:Label>
                                                <asp:HyperLink ID="Hyperlink2" runat="server" EnableViewState="false" Visible='<%# DataBinder.Eval(Container.DataItem, "URL").ToString().Length != 0 %>'
                                                    Text='<%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem,"Name").ToString()) %>'
                                                    NavigateUrl='<%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem,"URL").ToString())%>'
                                                    CssClass="blogcommentposter">
                                                </asp:HyperLink>
                                            </div>
                                            <div class="blogcommenttext">
                                                <NeatHtml:UntrustedContent ID="UntrustedContent1" runat="server" EnableViewState="false"
                                                    TrustedImageUrlPattern='<%# RegexRelativeImageUrlPatern %>' ClientScriptUrl="~/ClientScript/NeatHtml.js">
                                                    <asp:Literal ID="litComment" runat="server" EnableViewState="false" Text='<%# DataBinder.Eval(Container.DataItem, "Comment").ToString() %>' />
                                                </NeatHtml:UntrustedContent>
                                            </div>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                    <asp:Panel ID="pnlNewComment" runat="server">
                                        <asp:UpdatePanel ID="upCaptcha" runat="server">
                                            <ContentTemplate>
                                                <div class="settingrow">
                                                    <mp:SiteLabel ID="lblCommentTitle" runat="server" ForControl="txtCommentTitle" CssClass="settinglabel"
                                                        ConfigKey="BlogCommentTitleLabel" ResourceFile="ArticleResources" EnableViewState="false">
                                                    </mp:SiteLabel>
                                                    <asp:TextBox ID="txtCommentTitle" runat="server" Width="300" MaxLength="100" EnableViewState="false"
                                                        CssClass="verywidetextbox"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvCommentTitle" runat="server" ControlToValidate="txtCommentTitle"
                                                        ValidationGroup="blogcomments" ErrorMessage="*" />
                                                </div>
                                                <div class="settingrow">
                                                    <mp:SiteLabel ID="lblCommentUserName" runat="server" ForControl="txtName" CssClass="settinglabel"
                                                        ConfigKey="BlogCommentUserNameLabel" ResourceFile="ArticleResources" EnableViewState="false">
                                                    </mp:SiteLabel>
                                                    <asp:TextBox ID="txtName" runat="server" Width="300" MaxLength="100" EnableViewState="false"
                                                        CssClass="verywidetextbox"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="txtName"
                                                        ValidationGroup="blogcomments" ErrorMessage="*" />
                                                </div>
                                                <div id="divCommentUrl" runat="server" class="settingrow">
                                                    <mp:SiteLabel ID="lblCommentURL" runat="server" ForControl="txtURL" CssClass="settinglabel"
                                                        ConfigKey="BlogCommentUrlLabel" ResourceFile="ArticleResources" EnableViewState="false">
                                                    </mp:SiteLabel>
                                                    <asp:TextBox ID="txtURL" runat="server" Width="300" MaxLength="200" EnableViewState="false"
                                                        CssClass="verywidetextbox"></asp:TextBox>
                                                    <asp:RegularExpressionValidator ID="regexUrl" runat="server" ControlToValidate="txtURL"
                                                        ValidationGroup="blogcomments" ValidationExpression="(((http(s?))\://){1}\S+)"></asp:RegularExpressionValidator>
                                                </div>
                                                <div class="settingrow remember">
                                                    <mp:SiteLabel ID="lblRememberMe" runat="server" ForControl="chkRememberMe" CssClass="settinglabel"
                                                        ConfigKey="BlogCommentRemeberMeLabel" ResourceFile="ArticleResources" EnableViewState="false">
                                                    </mp:SiteLabel>
                                                    <asp:CheckBox ID="chkRememberMe" runat="server" EnableViewState="false" CssClass="forminput">
                                                    </asp:CheckBox>
                                                </div>
                                                <div class="settingrow">
                                                    <mp:SiteLabel ID="SiteLabel1" runat="server" CssClass="settinglabel" ConfigKey="BlogCommentCommentLabel"
                                                        ResourceFile="ArticleResources" EnableViewState="false"></mp:SiteLabel>
                                                    <asp:Label ID="lblCommentError" runat="server" CssClass="comment" Text="*" Visible="false" />
                                                    <asp:TextBox ID="edComment" runat="server" TextMode="MultiLine" CssClass="verywidetextbox multitext"/>
                                                </div>
                                                <asp:Panel ID="pnlAntiSpam" runat="server">
                                                    <mp:CaptchaControl ID="captcha" runat="server" />
                                                </asp:Panel>
                                                <div class="modulebuttonrow">
                                                    <portal:mojoButton ID="btnPostComment" runat="server" Text="Submit" ValidationGroup="blogcomments" />
                                                </div>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </asp:Panel>
                                    <asp:Panel ID="pnlCommentsClosed" runat="server" CssClass="commentwarning" EnableViewState="false">
                                        <asp:Literal ID="litCommentsClosed" runat="server" EnableViewState="false" />
                                    </asp:Panel>
                                    <asp:Panel ID="pnlCommentsRequireAuthentication" CssClass="commentwarning" runat="server" Visible="false" EnableViewState="false">
                                        <asp:Literal ID="litCommentsRequireAuthentication" runat="server" EnableViewState="false" />
                                    </asp:Panel>
                                </div>
                            </fieldset>
                        </asp:Panel>
                        <asp:Panel ID="pnlOther" runat="server" CssClass="otherpanel">
                            <div class="updateprogress">
                            <asp:UpdateProgress ID="upProgress1" runat="server" AssociatedUpdatePanelID="updatePanel">
                                <ProgressTemplate>
                                    <div class="updateProgress1">
                                        <asp:Image ID="imgProgress" runat="server" />
                                    </div>
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                            </div>
                            <div class="otherheader">
                                <asp:Label ID="lblOtherHeader" runat="server" CssClass="otherheadertext" /></div>
                            <asp:UpdatePanel ID="updatePanel" UpdateMode="Conditional" runat="server">
                                <ContentTemplate>
                                    <asp:ListView ID="lvOtherArticles" runat="server" ItemPlaceholderID="placeHolder">
                                        <LayoutTemplate>
                                            <asp:Panel ID="pnlPlaceHolderWrapper" runat="server" CssClass="other">
                                                <asp:PlaceHolder ID="placeHolder" runat="server" />
                                            </asp:Panel>
                                        </LayoutTemplate>
                                        <ItemTemplate>
                                            <div class="item">
                                                <asp:HyperLink ID="hplOtherTitle" CssClass="link" runat="server" title="" ToolTip='<%# FormatTooltip(DataBinder.Eval(Container.DataItem,"Heading").ToString(), DataBinder.Eval(Container.DataItem,"Description").ToString()) %>'
                                                    Text='<%# Eval("Heading") %>' NavigateUrl='<%# FormatBlogTitleUrl(DataBinder.Eval(Container.DataItem,"ItemUrl").ToString(), Convert.ToInt32(DataBinder.Eval(Container.DataItem,"ItemID"))) %>' />
                                            </div>
                                        </ItemTemplate>
                                    </asp:ListView>
                                    <asp:Panel ID="pnlOtherPager" runat="server" CssClass="otherpager">
                                    <asp:DataPager ID="dpOtherArticles" runat="server" PagedControlID="lvOtherArticles">
                                        <Fields>
                                            <asp:TemplatePagerField>
                                                <PagerTemplate>
                                                    <mp:SiteLabel ID="lblPageIndex" runat="server" ResourceFile="ArticleResources" ConfigKey="PageIndexLabel" CssClass="pageindex" />
                                                    <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# (Container.StartRowIndex / Container.PageSize) + 1 %>" />
                                                    <mp:SiteLabel ID="lblPageTotal" runat="server" ResourceFile="ArticleResources" ConfigKey="PageTotalLabel" CssClass="pagetotal" />
                                                    <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# (Container.TotalRowCount / (Container.PageSize + 1)) + 1 %>" />
                                                </PagerTemplate>
                                            </asp:TemplatePagerField>
                                            <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowPreviousPageButton="true"
                                                ShowLastPageButton="false" ShowNextPageButton="false" FirstPageText="<<" PreviousPageText="<" />
                                            <asp:NumericPagerField CurrentPageLabelCssClass="current" NextPreviousButtonCssClass="navi"
                                                NumericButtonCssClass="numeric" />
                                            <asp:NextPreviousPagerField ShowFirstPageButton="false" ShowPreviousPageButton="false"
                                                ShowLastPageButton="true" ShowNextPageButton="true" NextPageText=">" LastPageText=">>" />
                                        </Fields>
                                    </asp:DataPager>
                                    </asp:Panel>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                            
                        </asp:Panel>
                    </asp:Panel>
                </div>
                <asp:Panel ID="pnlExcerpt" runat="server" Visible="false">
                    <div class="blogtext">
                        <asp:Literal ID="litExcerpt" runat="server" EnableViewState="false" />
                    </div>
                    <mp:SiteLabel ID="SiteLabel2" runat="server" CssClass="settinglabel" ConfigKey="MustSignInToViewFullPost"
                        ResourceFile="ArticleResources" EnableViewState="false"></mp:SiteLabel>
                </asp:Panel>
            </asp:Panel>
        </div>
    </portal:mojoPanel>
    <div class="cleared">
    </div>
</asp:Panel>
